home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
351-375
/
359
/
dice
/
dice.lzh
/
lib
/
string
/
strncat.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-27
|
395b
|
38 lines
/*
* STRNCAT.C
*
* (c)Copyright 1990, Matthew Dillon, All Rights Reserved
*/
#include <string.h>
typedef unsigned char ubyte;
char *
strncat(d, s, n)
char *d;
const char *s;
int n;
{
char c;
char *base= d;
s;
n;
if (n) {
d += strlen(d);
while (c = *s) {
*d = c;
++s;
++d;
if (--n == 0)
return(base);
}
*d = 0;
}
return(base);
}